Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite custom resources by new data instead of appending to old data #1473

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

kangyili
Copy link
Contributor

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

Write there any instructions and details you may have to test your PR.

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, refactoring, documentation, tooling, dependencies

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 48.96%. Comparing base (c32a8ce) to head (436e9c2).

Files with missing lines Patch % Lines
pkg/remoteconfig/orchestrator_k8s_crd.go 0.00% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                    Coverage Diff                    @@
##           jlineaweaver/cap-1652    #1473      +/-   ##
=========================================================
- Coverage                  49.22%   48.96%   -0.27%     
=========================================================
  Files                        225      224       -1     
  Lines                      19854    19725     -129     
=========================================================
- Hits                        9774     9659     -115     
+ Misses                      9570     9563       -7     
+ Partials                     510      503       -7     
Flag Coverage Δ
unittests 48.96% <0.00%> (-0.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/remoteconfig/orchestrator_k8s_crd.go 0.00% <0.00%> (ø)

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c32a8ce...436e9c2. Read the comment docs.

@kangyili kangyili marked this pull request as ready for review October 18, 2024 15:20
@kangyili kangyili requested a review from a team as a code owner October 18, 2024 15:20
@kangyili kangyili merged commit 03611c4 into jlineaweaver/cap-1652 Oct 18, 2024
15 of 16 checks passed
@kangyili kangyili deleted the kangyi/jlineaweaver/cap-1652/fix branch October 18, 2024 15:21
levan-m added a commit that referenced this pull request Oct 22, 2024
* [Orch] Add CRD RC handler

* Remove print statement

* Refactor to separate file

* Move last function

* Use CRD specific status

* Add cluster agent config to RC

* Correctly set product

* Fix product and add logging

* Add fixes for crd nil pointers

* Revert accidental commit

* Update dependencies and add tag getter function

* Go.mod change

* Reset go.mod

* Update remoteconfig/state

* Fix updater package and work sum

* Clean up logs and force restart of DCA on CR changes

* Add a lock around get and update of DDA

* Improve comments and change test to use orchexp for annotation

* Change to not do annotations every single time

* Fill in orchestrator explorer for tests

* Go mod update

* Modify retry logic so it doesn't it for the entire update

* Fix go.mod

* Check in config crd stuff

* Remove hard coded product and update go.mod

* Revert go.mod back and fix errors

* Go.sum update

* overwrite cr by incoming data instead of appending to the old data (#1473)

* feedback

* feedback

* rename to OrchestratorK8sCRDRemoteConfig

---------

Co-authored-by: Kangyi LI <kangyi.li@datadoghq.com>
Co-authored-by: levan-m <116471169+levan-m@users.noreply.github.com>
levan-m added a commit that referenced this pull request Oct 22, 2024
* [Orch] Add CRD RC handler

* Remove print statement

* Refactor to separate file

* Move last function

* Use CRD specific status

* Add cluster agent config to RC

* Correctly set product

* Fix product and add logging

* Add fixes for crd nil pointers

* Revert accidental commit

* Update dependencies and add tag getter function

* Go.mod change

* Reset go.mod

* Update remoteconfig/state

* Fix updater package and work sum

* Clean up logs and force restart of DCA on CR changes

* Add a lock around get and update of DDA

* Improve comments and change test to use orchexp for annotation

* Change to not do annotations every single time

* Fill in orchestrator explorer for tests

* Go mod update

* Modify retry logic so it doesn't it for the entire update

* Fix go.mod

* Check in config crd stuff

* Remove hard coded product and update go.mod

* Revert go.mod back and fix errors

* Go.sum update

* overwrite cr by incoming data instead of appending to the old data (#1473)

* feedback

* feedback

* rename to OrchestratorK8sCRDRemoteConfig

---------

Co-authored-by: Kangyi LI <kangyi.li@datadoghq.com>
Co-authored-by: levan-m <116471169+levan-m@users.noreply.github.com>
levan-m added a commit that referenced this pull request Oct 22, 2024
* [Orch] Add CRD RC handler

* Remove print statement

* Refactor to separate file

* Move last function

* Use CRD specific status

* Add cluster agent config to RC

* Correctly set product

* Fix product and add logging

* Add fixes for crd nil pointers

* Revert accidental commit

* Update dependencies and add tag getter function

* Go.mod change

* Reset go.mod

* Update remoteconfig/state

* Fix updater package and work sum

* Clean up logs and force restart of DCA on CR changes

* Add a lock around get and update of DDA

* Improve comments and change test to use orchexp for annotation

* Change to not do annotations every single time

* Fill in orchestrator explorer for tests

* Go mod update

* Modify retry logic so it doesn't it for the entire update

* Fix go.mod

* Check in config crd stuff

* Remove hard coded product and update go.mod

* Revert go.mod back and fix errors

* Go.sum update

* overwrite cr by incoming data instead of appending to the old data (#1473)

* feedback

* feedback

* rename to OrchestratorK8sCRDRemoteConfig

---------

Co-authored-by: Joshua Lineaweaver <JLineaweaver@gmail.com>
Co-authored-by: Kangyi LI <kangyi.li@datadoghq.com>
Co-authored-by: Fanny Jiang <fanny.jiang@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants